<!-- 右侧内容 -->
<template>
  <div class="content-view">
      <div class="content-page">
          <div class="content-title">
              <span>{{data.Title}}</span>
          </div>
          <p class="content-remark">【发布时间：{{data.AddTime|fnDatetime}}】</p>
      </div>
      <div class="content-content" v-html="data.Content">
          
      </div>
      
  </div>
</template>

<script>
import { fnDatetime } from "@/unit/index";


import{ArticleModel} from '@/api/data';

export default {
  data() {
    return {
      data:{}
    };
  },
 async mounted() {
    let guid=this.$route.params.guid;
        let data=new Object();
        data.Guid=guid;
        const res = await ArticleModel(data);
        if(res.code==0){
            this.data=res.data;
        }
  },
  /**过滤器 */
  filters: {
    fnDatetime(time){
      let obj=fnDatetime(time);
      return obj.year+'年'+obj.month+'月'+obj.day+'日';
    }
  },
  /** 组件注册 */
  components: {}
};
</script>
<style scoped>
.content-view{
    padding: 20px 0;
}
.content-page {
  text-align: center;
  margin: 25px 25px;
}
.content-title {
  font-size: 30px;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #ddd;
}
.content-remark {
  color: #888;
  font-size: 14px;
  padding: 10px;
}
.content-content {
  color: #666;
  line-height: 2;
  margin: 25px 50px 50px 50px;
}
.content-content p {
  text-indent: 2em;
  margin: 0 0 10px 0;
}
.content-content img {
  max-width: 90%;
  margin: 0 5%;
}
</style>